import { Checkbox, Col, Row } from 'antd';
import Editor from 'react-monaco-editor';

interface IProps {
    onChange?: (value: string) => void,
    value: string;
    language?: string;
    height?: number;
}

const options = {
    selectOnLineNumbers: true,
    fontSize: 14,
    formatOnPaste: true,
    automaticLayout: true,
    minimap: {
        enabled: false,
    },
};

const CodeEditor: React.FC<IProps> = (props) => {

    const { value, onChange, language, height } = props;

    return <div>
        <Editor theme="vs-dark" options={options} value={value} onChange={onChange} language={language} height={height} />
    </div>
}

export default CodeEditor
